package com.Cheng.service;

import com.Cheng.dao.BuukMapper;
import com.Cheng.pojo.Buuks;

import java.util.List;

/**
 * @Author Cheng
 * @Date 2022/4/10 15:54
 * service的impl是把mapper和service进行整合的文件。
 */
public class BuukServiceImpl implements BuukService{
    //Service调用dao层：组合Dao
    private BuukMapper buukMapper;

    public void setBuukMapper(BuukMapper buukMapper) {
        this.buukMapper = buukMapper;
    }

    @Override
    public int addBuuk(Buuks buuk) {
        return buukMapper.addBuuk(buuk);
    }

    @Override
    public int deleteBuukById(int id) {
        return buukMapper.deleteBuukById(id);
    }

    @Override
    public int updateBuuk(Buuks buuk) {
        return  buukMapper.updateBuuk(buuk);
    }

    @Override
    public Buuks queryBuukById(int id) {
        return buukMapper.queryBuukById(id);
    }

    @Override
    public List<Buuks> queryAllBuuk() {
        return buukMapper.queryAllBuuk();
    }



}